import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'//全局element-ui
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'//全局axios
import VueAxios from 'vue-axios'
import VueCookies from 'vue-cookies'
import VueParticles from 'vue-particles'
import Vuex from 'vuex'
import qs from 'qs'
// import ECharts from 'vue-echarts/components/ECharts'
// import 'echarts/lib/chart/line'
// Vue.component('chart', ECharts)

// import echarts from 'echarts'// 引入echarts
// Vue.prototype.$echarts = echarts
Vue.prototype.$qs=qs;
Vue.use(Vuex)
Vue.use(VueParticles)
Vue.use(VueCookies)
Vue.use(VueAxios, axios)
Vue.use(ElementUI)
Vue.config.productionTip = false

//加上token
axios.interceptors.request.use(config => {
    config.headers.Authorization ='Bearer '+window.sessionStorage.getItem('token');
    return config;
})



new Vue({
  router,
  store,
  render: h => h(App) 
}).$mount('#app')
